﻿using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OpenAdmin.Core.DbContextLocators;

namespace OpenAdmin.Core.Models;

public class BlogPostsCount : KeylessEntity<BloggingDbContextLocator>, IEntityTypeConfigure<BlogPostsCount>
{
    public BlogPostsCount() : base("View_BlogPostCounts")
    {

    }
    public string BlogName { get; set; }
    public int PostCount { get; set; }

    public void Configure(EntityTypeBuilder<BlogPostsCount> entityBuilder)
    {
        entityBuilder.Property(t => t.BlogName).HasColumnName("Name");
    }
}
